package mainmenu 
{
	import game.GameWorld;
	import net.flashpunk.FP;
	import net.flashpunk.graphics.Text;
	import net.flashpunk.World;
	import punk.ui.PunkButton;
	import punk.ui.PunkUI;
	import punk.ui.skins.RolpegeBlue;
	/**
	 * ...
	 * @author rnk
	 */
	public class MainMenu extends World
	{
		
		public function MainMenu() 
		{
			PunkUI.skin = new RolpegeBlue();
		}
		
		override public function begin():void 
		{
			
			var title:Text = new Text("дварфы против визардов",300,150);
			addGraphic(title);
			
			var button:PunkButton = new PunkButton((800-200)/2, 300, 200, 25, "новая игра");
			add(button);
			button.setCallbacks(onReleased);
			
			button = new PunkButton((800-200)/2, 350, 200, 25, "кредитсы");
			add(button);
			//button.setCallbacks(onReleased);
			
			button = new PunkButton((800-200)/2, 400, 200, 25, "опции");
			add(button);
			//button.setCallbacks(onReleased);
		}
		
		public function onReleased():void
		{
			FP.world = new GameWorld();
		}
		
	}

}